package innerclass;
class A {
    protected int age = 18;
}
class B {
    protected String msg = "hello world";
}
public class Inherit {
    public static void main(String[] args) {
        Inherit inherit = new Inherit();
        inherit.fun();
    }
    private class InnerClassA extends A {}
    private class InnerClassB extends B {}
    public void fun() {
        InnerClassA a = new InnerClassA();
        InnerClassB b = new InnerClassB();
        System.out.println(a.age);
        System.out.println(b.msg);
    }
}
